/*
Author: Max E. K
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace OpenGado.DATA.Entities
{
	/// <summary>
	/// RequestHeader object for NHibernate mapped table 'request_header'.
	/// </summary>
	[Serializable]
	public class RequestHeader
	{
		#region Member Variables
		protected int _requestheaderid;
		protected string _requestnumber;
		protected DateTime? _requestdate;
		protected string _requestby;
		protected string _authorizationstatus;
		protected string _requestcommnet;
		protected IList<Authorizations> _authorizations;
		protected IList<IssueItemHeader> _issueitemheader;
		protected IList<RequestItem> _requestitem;
		#endregion
		#region Constructors
			
		public RequestHeader() {}
					
		public RequestHeader(string requestnumber, DateTime? requestdate, string requestby, string authorizationstatus, string requestcommnet) 
		{
			this._requestnumber= requestnumber;
			this._requestdate= requestdate;
			this._requestby= requestby;
			this._authorizationstatus= authorizationstatus;
			this._requestcommnet= requestcommnet;
		}

		#endregion
		#region Public Properties
		public  virtual int RequestHeaderId
		{
			get { return _requestheaderid; }
			set {_requestheaderid= value; }
		}
		public  virtual string RequestNumber
		{
			get { return _requestnumber; }
			set {_requestnumber= value; }
		}
		public  virtual DateTime? RequestDate
		{
			get { return _requestdate; }
			set {_requestdate= value; }
		}
		public  virtual string RequestBy
		{
			get { return _requestby; }
			set {_requestby= value; }
		}
		public  virtual string AuthorizationStatus
		{
			get { return _authorizationstatus; }
			set {_authorizationstatus= value; }
		}
		public  virtual string RequestCommnet
		{
			get { return _requestcommnet; }
			set {_requestcommnet= value; }
		}
		public  virtual IList<Authorizations> Authorizations
		{
			get { return _authorizations; }
			set {_authorizations= value; }
		}
		public  virtual IList<IssueItemHeader> IssueItemHeader
		{
			get { return _issueitemheader; }
			set {_issueitemheader= value; }
		}
		public  virtual IList<RequestItem> RequestItem
		{
			get { return _requestitem; }
			set {_requestitem= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			RequestHeader castObj = (RequestHeader)obj;
			return ( castObj != null ) &&
			this._requestheaderid == castObj.RequestHeaderId;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _requestheaderid.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
